/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package snake;

import java.io.Serializable;

/**
 *
 * @author Ferenczy Máté
 */
public class Elem implements Serializable, Comparable<Elem> {
    private String nev;
    private long ido;
    public Elem(String n, long p, long mp)
    {
        nev=n;
        ido=p*60+mp;
    }

    @Override
    public int compareTo(Elem o) {
        return (this.ido>o.ido)? 1 : -1;
    }

    public long getIdo()
    {
        return ido;
    }
    
    public String getNev()
    {
        return nev;
    }
}
